package cn.buk.tms.eotms.dto;

import cn.buk.tms.common.dto.base.BaseDto;
import cn.buk.tms.eotms.entity.PaymentOrder;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.beans.BeanUtils;

/**
 * @author yfdai
 */
public class PaymentOrderDto extends BaseDto {

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer id;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String tradeNo;

//	private int enterpriseId;
//
//	private String enterpriseName;
//
//	private Integer ownerEnterpriseId;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer userId;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Double price;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer status;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer orderType;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer orderId;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String memo;

  public static PaymentOrderDto createdBy(PaymentOrder o) {
  	PaymentOrderDto dto = new PaymentOrderDto();
		BeanUtils.copyProperties(o, dto);

		return dto;
  }

  public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	/**
	 * 订单类型：
	 * 空或者 00 表示充值
	 * 01 - 表示大客户订单（目前唯一的订单类型）
	 */
	public Integer getOrderType() {
		return orderType;
	}

	public void setOrderType(Integer orderType) {
		this.orderType = orderType;
	}

	/**
	 * 订单类型是大客户订单的话，则保留订单的 id ，方便页面跳转;
	 * 其它情况留空
	 */
	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	/**
	 * 订单备注
	 */
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}


	// 以下为微信支付返回的内容

//	private String appid;
//
//	private String mchId;
//
//	private String deviceInfo;
//
//	private String openid;
//
//
//	private String transactionId;
//
//	private String bankType;
//
//	private Integer cashFee;
//
//	private String timeEnd;

}

